#!/usr/bin/env python
# coding=utf-8
# __author__ = 'Yunchao Ling'

from Bio import SeqIO
import sys
import os

if __name__ == '__main__':
    ht = {}

    parentpath = sys.argv[1]
    for file in os.listdir(parentpath):
        infilepath = os.path.join(parentpath, file)
        for seq_record in SeqIO.parse(infilepath, "fasta"):
            gi = seq_record.id
            if gi in ht:
                ht[gi] += 1
            else:
                ht[gi] = 1
    for key in ht.keys():
        if ht[key] > 1:
            print(key)
